<!DOCTYPE html>
<html lang="ja">
<head>
	<title><?php echo $title_for_layout;?></title>
	<?php echo $this->Html->charset(); ?>
	<?php echo $this->Html->meta('favicon.ico', $this->webroot.'img/favicon.ico', array('type' => 'icon')); ?>
	<?php echo $html->meta('description', 'Adams campusは、「教えられる」「学びたい」知識・スキルを仲間とシェアし合うきっかけを提供するプラットフォームです。', array(), false);?>
	<?php echo $html->meta('keywords', 'Adams campus, 教える, 学ぶ, 知識, スキル, シェア, 講座, イベント, セミナー, ロバスト, Robust', array(), false);?>
	<meta property="og:site_name" content="Adams campus"/>
	<meta property="og:title" content="<?php echo $title_for_layout;?>" />
	<meta property="og:description" content="Adams campusは、「教えられる」「学びたい」知識・スキルを仲間とシェアし合うきっかけを提供するプラットフォームです。" />
	<meta property="og:url" content="<?php echo Router::url(null, true); ?>" />
	<meta property="og:image" content="http://www.adamscampus.com/img/ogp.png"/>
	<meta property="og:type" content="website"/>
<?php
	echo $this->Html->css('cake.generic.css');
	echo $this->Html->css('nivo-slider.css');
	echo $this->Html->css('jquery.tagit.css');
	echo $this->Html->css('tagit.ui-zendesk.css');
	echo $this->Html->css('common.css');
	echo $this->Html->css('default.css');
	echo $this->Html->css('style.css');
?>
</head>
<body>
<!-- #wrapper -->
<div id="wrapper">
<?php echo $this->element('header'); ?>
<!-- #body -->
<div id="body">
	<!-- .container -->
	<div class="container clearfix">

		<?php echo $content_for_layout; ?>

	</div>
	<!-- /.container -->
</div>
<!-- /#main -->
<?php echo $this->element('footer');?>
</div>
<!-- /#wrapper -->
<div id="fb-root"></div>
<script>(function(d, s, id) {
	var js, fjs = d.getElementsByTagName(s)[0];
	if (d.getElementById(id)) return;
	js = d.createElement(s); js.id = id;
	js.src = "//connect.facebook.net/en_US/all.js#xfbml=1&appId=404188826330813";
	fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
	var messages = <?php echo json_encode($messages);?>;
</script>
<?php
$script = 'var ajaxCourseDetail = "' . $this->Html->url(array('controller' => 'ajax', 'action' => 'course_detail')) . '";';
$script .= ' var loginUrl = "' . $this->Html->url(array('controller' => 'Users', 'action' => 'signin')) . '";';
$script .= ' var addCourseUrl = "' . $this->Html->url(array('controller' => 'course', 'action' => 'add')) . '";';
$script .= ' var updateUserStatusUrl = "' . $this->Html->url(array('controller' => 'ajax', 'action' => 'user_status')) . '";';
$script .= ' var userStatusExpireTime = ' . intval(Configure::read('UserStatus.user_status_expire_time')) . ';';

if (isset($_SERVER['AUTH_TYPE'])) {
	$script .= '$.ajaxSetup({
			username: "starmark",
			password: "1234",
			headers: {
				Authorization: "' . $_SERVER['AUTH_TYPE'] . ' ' . base64_encode('starmark:1234') .'"
			}
		});';
}

echo $this->Html->scriptBlock($script);
echo $this->Html->script(array(
	'plugin/jquery-1.8.2.min.js',
	'plugin/jquery.nivo.slider.pack.js',
	'general.js',
));


echo $scripts_for_layout;
?>
<?php echo $this->element('sql_dump');?>
</body>
</html>